package org.example.jdk;

//jdk代理基于接口
//代理类实现与目标类相同的接口
public class JDKProxy implements TargetInterface {
    //包含目标类对象
    TargetInterface target;

    public JDKProxy(TargetInterface target) {
        this.target = target;
    }
    @Override
    public void run() {
        System.out.println("前置执行...");
        target.run();
    }
}
